<?php
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use yii\helpers\Url;
?>
<?= Html::cssFile('./assets/css/uploadsoft.css')?>
<?= Html::jsFile('./assets/uploadsoft/jquery.min.js')?>
<?= Html::jsFile('./assets/uploadsoft/jquery.form.js')?>
<?= Html::jsFile('./assets/js/systemupload.js')?>
<!--新增轮播图开始-->
<div class="modal-dialog ">
	<div class="modal-content">
		<div class="modal-header">
			<button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button>
			<h4 class="modal-title">教师详细信息</h4>
		</div>
		<div class="modal-body">
				<?php
				$form = ActiveForm::begin([
					'options' => ['class' => 'form-horizontal', 'id'=>'addmodal-body','enctype' => 'multipart/form-data'],
					'action'=>Url::to(['operate/bannerupd']),
					'method'=>'post',
					'fieldConfig' => [
						'template' => '<div class="row form-group"><div class="col-md-3 control-label">{label}</div><div class="col-md-8 controls">{input}
{error}<div class="help-block"
style="display:none;"></div></div></div><p></p>'
					],
				]);
				?>

				<?= $form->field($model, 'banner_id',['template'=>"{input}"])->hiddenInput(); ?>

				<?= $form->field($model, 'banner_title')->textInput(['maxlength' => 30]); ?>


				<div class="row form-group">
					<div class="col-md-3 control-label">

					</div>
					<div class="col-md-8 controls">
						<img class="picture" id="systemimg" src="http://files.bwphp.com/file/image/show/1160/500?path=<?= $model->attributes['banner_thumb']?>" style="width: 150px;height: 150px;">
						<div class="help-block" style="display:none;">

						</div>
					</div>
				</div>
				<p></p>

				<div class="row form-group">
					<div class="col-md-3 control-label">
					</div>
					<div class="col-md-8 controls">

						<div class="form-group" style="margin-left:0px" >
							<p class="help-block">你可以上传jpg, gif, png格式的文件, 图片建议尺寸至少为480x270。<br>文件大小不能超过<strong>2M</strong>。</p>
							<input type="hidden" id="system_thumb" name="Banner[banner_thumb]">
							<div class="btn" style="">
								<span>添加图片</span>
								<?= Html::fileInput('filedata','', ['id'=>'fileupload']) ?>
							</div>
							<div class="progress" style='margin-left:100px'>
								<span class="bar"></span><span class="percent">0%</span >
							</div>
							<div class="files" style='margin-left:0px'></div>
							<div id="showimg"></div>
						</div>

						<div class="help-block" style="display:none;">

						</div>
					</div>
				</div>
				<p></p>



				<?= $form->field($model, 'banner_url')->textInput() ?>

				<?= $form->field($model, 'banner_desc')->textInput() ?>

				<div class="modal-footer">
					<?= Html::Button('取消', ['class' => 'btn btn-bannergroup','data-dismiss'=>'modal','id'=>'close']) ?>
					<?= Html::submitButton('修改', ['class' => 'btn btn-primary']) ?>
				</div>
				<?php ActiveForm::end();?>
		</div>
	</div>
</div>
<!--新增轮播图结束-->